<template>
  <div class="flex align-items-center m-y-10">
    <log-icon icon-name="log-accept" class="shrink-0" />
    <div>
      <router-link :to="linkUrl" class="title link hover-underline">
        {{ item.mod.newVal.author.nickname }}的回答
      </router-link>
      被采纳了
      <timeago2 :date-time="item.created_at" pre-text=" - " class="info-deep" />
    </div>
  </div>
</template>

<script>
import LogIcon from './log-icon';

export default {
  name: 'accept-answer-item',
  components: { LogIcon },
  props: {
    item: Object,
  },
  computed: {
    linkUrl() {
      return {
        path: this.$route.path,
        query: {
          page: undefined,
          sub_page: undefined,
          comment_id: this.item.mod.newVal.commentId,
        },
      };
    },
  },
};
</script>

<style></style>
